home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Hyper / Rinaldi / HC 1.2 & 2.0 / PICTFile 1.7 .cpt / PICTFile 1.7 / PICTFile 1.7 / card_3055.txt < prev    next >
Encoding:
Text File  |  1991-12-26  |  7.8 KB  |  258 lines

  1. -- card: 3055 from stack: in.7 
  2. -- bmap block id: 3273
  3. -- flags: 0000
  4. -- background id: 2661
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 01
  10. -- high flags: 0007
  11. -- rect: left=69 top=68 right=252 bottom=434
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 3
  16. -- text size: 9
  17. -- style flags: 0
  18. -- line height: 12
  19. -- part name: 
  20.  
  21.  
  22. -- part 26 (button)
  23. -- low flags: 00
  24. -- high flags: A003
  25. -- rect: left=97 top=298 right=320 bottom=267
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 1
  29. -- font id: 0
  30. -- text size: 12
  31. -- style flags: 0
  32. -- line height: 16
  33. -- part name: ClipToPICTFile
  34. ----- HyperTalk script -----
  35. on mouseUp
  36.   answer "Want to give the file name (or pathname) ?" with "Yes" or "No"
  37.   if it is "Yes"
  38.   then
  39.   get newFileName("Create PICT file :","MyPICTFile")
  40.   if it is empty then exit mouseUp
  41.   ClipToPICTFile it
  42. else ClipToPICTFile
  43. put the Result into cd fld 2
  44. end mouseUp
  45.  
  46.  
  47.  
  48. -- part 27 (button)
  49. -- low flags: 00
  50. -- high flags: A003
  51. -- rect: left=309 top=298 right=320 bottom=479
  52. -- title width / last selected line: 0
  53. -- icon id / first selected line: 0 / 0
  54. -- text alignment: 1
  55. -- font id: 0
  56. -- text size: 12
  57. -- style flags: 0
  58. -- line height: 16
  59. -- part name: PICTFileToClip
  60. ----- HyperTalk script -----
  61. on mouseUp
  62.   put FilePath("PICT","PICT file to import :") into File
  63.   if File ‚↠empty
  64.   then
  65.   answer "<scale> parameter :" with "False" or "True"
  66.   put it into Scale
  67.   ask "<DestRect> parameter :" with "0,0,512,342"
  68.   if it is empty
  69.   then PICTFileToClip File,Scale
  70. else PICTFileToClip File,Scale,it
  71. get the Result
  72. if it is empty
  73. then
  74. set cursor to 4
  75. go next
  76. type "V" with commandKey
  77. put "Please click..."
  78. wait until the mouseClick
  79. put empty
  80. type "X" with commandKey
  81. choose browse tool
  82. go previous
  83. else put it into cd fld 2
  84. end if
  85. end mouseUp
  86.  
  87.  
  88.  
  89. -- part 28 (field)
  90. -- low flags: 01
  91. -- high flags: 0004
  92. -- rect: left=75 top=268 right=285 bottom=480
  93. -- title width / last selected line: 0
  94. -- icon id / first selected line: 0 / 0
  95. -- text alignment: 0
  96. -- font id: 3
  97. -- text size: 9
  98. -- style flags: 0
  99. -- line height: 12
  100. -- part name: 
  101.  
  102.  
  103. -- part contents for card part 1
  104. ----- text -----
  105.  
  106.    This stack contains two XCMDs, PictFileToClip and ClipToPictFile, that allow to transfer a picture between the Clipboad and a PICT file.
  107.  
  108.  
  109.                                            PICTFileToClip 1.7
  110.  
  111.  
  112. DESCRIPTION
  113. ------------
  114.    Transfers the PICT file content to the clipboard.
  115.  
  116.  
  117. SYNTAX
  118. -------
  119.    PICTFileToClip <pathname of PICT file>[,<Scale>][,<origin>][,<NewRect>]
  120.  
  121. PARAMETERS
  122. ------------
  123.    The file pathname is the only needed parameter, and is a string giving the full pathname of the PICT file on the volume. It can be a single name or whole pathname. If just a single name is supplied, the file is assumed to be in the same folder than the current stack.
  124.  
  125.    Scale is boolean, and tells the picture to be scaled (TRUE) or cropped 
  126. (FALSE) to fit in the destination rectangle. Default value is FALSE, and the only visible picture's part will be the top left rectangle of it.
  127.  
  128.    Origin is a point "X,Y" giving the origin of the picture to get.
  129.  
  130.    NewRect tells the destination rectangle that will be used for pasting. Its coordinates are relative to the card, and it will be "Xt,Yt,Xb,Yb" shaped. Default value is the whole card's rectangle.
  131.  
  132.    Using "!", "?" or "=" as first parameter will return an online help (resp. copyright, syntax and output).
  133.  
  134.  
  135. USING
  136. ------
  137.    If no error occured, the Result will be empty. Otherwise, it will contain :
  138.      "Error : Not a file"
  139.      "Error : Not a folder"
  140.      "Error : Alias file not supported"
  141.      "Error : Volume not found"
  142.      "Error : Bad Name"
  143.      "Error : File not found"
  144.      "Error : Folder not found"
  145.      "Error : File is busy"
  146.      "Error : I/O Error"
  147.      "Error : Folder is full"
  148.      "Error : Volume is locked"
  149.      "Error : No resource fork"
  150.      "Error : Duplicate file/folder name"
  151.      "Error : Moving whole volume not allowed"
  152.      "Error : Not an AppleShare volume"
  153.      "Error : AppleShare insufficient privileges"
  154.      "Error : Missing or empty parameter"
  155.      "Error : Defined Rect is off-screen"
  156.      "Error : Bad param #X"
  157.      "Error : Not a PICT file"
  158.      "Error : Out of memory"
  159.      "Error : Couln't clear Clipboard"
  160.      "Error : Couln't set Clipboard"
  161.  
  162.  
  163. HISTORY
  164. --------
  165. 1.7 :                                                                                          12/25/91
  166. ‚Ä¢ Fixed alias file bug under System 7.0.1
  167.  
  168. 1.6 :                                                                                          11/15/91
  169. ‚Ä¢ Fixed a random bug due to image size
  170.  
  171. 1.5 :                                                                                          09/02/91
  172. ‚Ä¢ Fixed a bug crashing Macs without Color QD
  173.  
  174. 1.4 :                                                                                          08/20/91
  175. ‚Ä¢ Added support for color pictures in HC 2.0.
  176. ‚Ä¢ Removed GetFrontDocWindow, StrToRect and StrToPoint calls for HC 1.2 compatibility.
  177.  
  178. 1.3 :                                                                                          08/04/91
  179. ‚Ä¢ Added support for System 7.0 alias files
  180. ‚Ä¢ General enhancement of the code
  181. ‚Ä¢ Added "=" param for online help
  182.  
  183. 1.1
  184. ‚Ä¢ Adds online help
  185. ‚Ä¢ add origin parameter
  186.  
  187.  
  188.  
  189.                                             ClipToPICTFile 1.7
  190.  
  191.                                                 By F. Rinaldi
  192.  
  193. DESCRIPTION
  194. ------------
  195.    Each call to ClipToPICTFile XCMD creates a PICT file with the current clipboard's content.
  196.  
  197.  
  198. SYNTAX
  199. ------
  200.       ClipToPICTFile[<name or pathname of PICT file>][,"c=<creator>"]
  201.  
  202.  
  203. PARAMETERS
  204. -------------
  205.    With no parameter, the default created file is named "PICTFile X" at the current stack's level, X being a positive integer which increments automatically. With a single name, the file will be created at the current stack's level. With a full pathname, its location can be choosen exactly on the volume.
  206.  
  207.    If no Creator is given, "MDPL" will be used as default (for MacDraw).
  208.  
  209.   Using "!", "?" or "=" as first parameter will return an online help (resp. copyright, syntax and output).
  210.  
  211.  
  212. USING
  213. -----
  214.    If no error occured, the Result will be empty, or will contain the full patname of the created file if no pathname was passed. Otherwise, it can contain :
  215.      "Error : Not a file"
  216.      "Error : Not a folder"
  217.      "Error : Alias file not supported"
  218.      "Error : Volume not found"
  219.      "Error : Bad Name"
  220.      "Error : File not found"
  221.      "Error : Folder not found"
  222.      "Error : File is busy"
  223.      "Error : I/O Error"
  224.      "Error : Folder is full"
  225.      "Error : Volume is locked"
  226.      "Error : No resource fork"
  227.      "Error : Duplicate file/folder name"
  228.      "Error : Moving whole volume not allowed"
  229.      "Error : Not an AppleShare volume"
  230.      "Error : AppleShare insufficient privileges"
  231.      "Error : Couln't load Scrap"
  232.      "Error : No PICT in Clipboard"
  233.      "Error : Bad creator parameter"
  234.  
  235.  
  236. HISTORY
  237. --------
  238. 1.7 :                                                                                          12/25/91
  239. ‚Ä¢ Fixed alias file bug under System 7.0.1
  240.  
  241. 1.3 :                                                                                          08/04/91
  242. ‚Ä¢ Added support for System 7.0 alias files
  243. ‚Ä¢ General enhancement of the code
  244. ‚Ä¢ Added "=" param for online help
  245.  
  246. 1.1
  247. ‚Ä¢ adds online help
  248.  
  249.  
  250. This stack uses FilePath  XFCN (¬© 1898, 1990 Apple Computer, Inc.)
  251. --------------------------------------------------------------------
  252.  
  253. This (these) external(s) is (are) FreeWare,allowing unlimited use in any non-commercial stack. You just need in this case to mention the author's name and copyright in your stack.
  254. Any commercial use must be licensed and aknowledged by the author.
  255.  
  256.                                ¬© F. Rinaldi - 1989,1990,1991
  257.  
  258. AppleLink: RINALDI1        CalvaCom : FR10        Compuserve : 71170,2111